class Student {
    public String name;
    public int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Student() {
        System.out.println("不带参数的构造方法");
    }

    {
        name = "lisi";
        System.out.println("非静态代码块/实例代码块/构造代码块！-->初始化非静态的数据成员");
    }

    static {
        System.out.println("静态代码块--> 初始化静态的数据成员/提前准备一些数据");
    }

    public void doClass() {
        System.out.println(name + "上课！");

    }
    public static void func(){
        System.out.println();
    }
}
public class Test {
    public static void main(String[] args) {
        Student student = new Student();
        Student.func() ;
        System.out.println("================");
        Student student1 = new Student();
        Student.func();
    }
    public static void main1(String[] args) {
        Student student = new Student() ;
    }
}
